<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<script>
		// 1、多行字符串
		let str1='In JavaScript this is\n not legal.'   //要有换行转义字符才可以进行分行打印
		console.log(str1);

		let str2 =  `In JavaScript this is
		not legal.`
		console.log(str2);
		//In JavaScript this is
		//not legal.

		// 2、字符串插入变量和表达式。变量名写在 ${} 中，${} 中可以放入 JavaScript 表达式。
		let name = "Mike"
		let age = 27
		let info = `My Name is ${name},I am ${age+1} years old next year.`
		console.log(info)// My Name is Mike,I am 28 years old next year.

		// 3、字符串中调用函数
		function f(){
			return "have fun!"
		}
		let str3 = `Game start,${f()}`
		console.log(str3);  // Game start,have fun!
	</script>
</body>
</html>